from multiprocessing import Process

def func():
    for i in range(10):
        print('子进程',i)

if __name__ == '__main__':
    p = Process(target=func,)
    p.start()
    for i in range(10):
        print('主进程',i)

# 也可以像进程一样创建一个类






